﻿@model IEnumerable<Leo.Entities.Laboratorio>

<table>
    <tr>
        <th>Laboratorio</th>
        <th>
            @Html.DisplayNameFor(model => model.nombre_lab)
        </th>
        <th>
            @Html.DisplayNameFor(model =>model.comentario)
        </th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.nombre_lab)
            </td>
            <td>
                @Html.DisplayFor(modelItem=>item.comentario)
            </td>

            <td>
                @Ajax.ActionLink("Editar","Index", new AjaxOptions(){
                  Url = Url.Action("Edit",new {id=item.id_laboratorio}),
                  UpdateTargetId ="upEdit",
                  OnSuccess="OnSuccessEdit"
                  })|
            
                @Ajax.ActionLink("ver Detalles", "Index", new AjaxOptions()
               {
                   Url = Url.Action("Details", new { id=item.id_laboratorio}),
                   UpdateTargetId="upDetails",
                   OnSuccess="OnSuccessDetails"
               })|
                @Ajax.ActionLink("Eliminar", "Index", new AjaxOptions()
           {
               Url = Url.Action("Delete", new { id= item.id_laboratorio}),
               UpdateTargetId="listLaboratorios",
               Confirm="Desea EliminarEste Producto?"
           })
            </td>
        </tr>
    }

</table>